package com.ll.utils;


import com.ll.common.MessageConstant;
import lombok.Data;

@Data
public class Result {
    private int code;
    private String msg;
    private Object data;

    private Result() {}

    public static Result success(Object data) {
        Result result = new Result();
        result.setCode(200);
        result.setData(data);
        return result;
    }
    public static Result error(String  msg) {
        Result result = new Result();
        result.setCode(400);
        result.setMsg(msg);
        result.setData(null);
        return result;
    }
}
